-- card: 4491 from stack: in.0 -- bmap block id: 4648 -- flags: 0000 -- background id: 3429 -- name: -- part 2 (button) -- low flags: 00 -- high flags: A003 -- rect: left=378 top=312 right=333 bottom=495 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Document... ----- HyperTalk script ----- on mouseUp put the hilite of cd btn 2 into pSS put the hilite of cd btn 3 into pBgS put the hilite of cd btn 4 into pBgF put the hilite of cd btn 5 into pBgFS put the hilite of cd btn 6 into pBgFC put the hilite of cd btn 7 into pBgBtn put the hilite of cd btn 8 into pBgBtnS put the hilite of cd btn 9 into pCdS put the hilite of cd btn 10 into pCdF put the hilite of cd btn 11 into pCdFS put the hilite of cd btn 12 into pCdFC put the hilite of cd btn 13 into pCdBtn put the hilite of cd btn 14 into pCdBtnS get filename("STAK") if it is empty then exit mouseUp put it into theStack get NewFileName( "Save documentation as?", "" ) if it is empty then exit mouseUp put it into theFile get the long name of this stack put it into MyId open file theFile go first card push this stack lock screen go stack theStack write "** Stack documentation **" & return & return to file theFile write "** Stack Name:" & tab & tab & short name of this stack to file theFile put number of backgrounds into nBack write return & "** Total Backgrounds:" & tab & tab & nBack & return to file theFile write "** Total Cards:" & tab & tab & the number of cards & return to file theFile write return to file theFile if pSS = true then write "** Stack Script:" & return to file theFile if the script of this stack is empty then write "" & return & return to file theFile else write the script of this stack & return & return to file theFile end if else write return to file theFile end if -- Process backgrounds repeat with cBack = 1 to nBack go to bg cBack write return & "** Background # " & cBack & return to file theFile put short name of this bg into bgName if bgName is empty then put "" into bg name write "Bg name:" & tab & tab & bgName & return to file theFile write "Bg id:" & tab & tab & id of this bg & return to file theFile if pBgS = true then write "Bg " & cBack & " Script: " & return to file theFile if the script of this bg is empty then write "" & return & return to file theFile else write the script of this bg & return & return to file theFile end if else write return to file theFile end if -- Process Bg fields put the number of bg fields into nFields repeat with cField = 1 to nFields if pBgF = true then write "Bg fld # " & cField & ":" & return to file theFile put short name of bg field cField into tempName if tempName is empty then put "" into tempName write "Bg fld Name:" & tab & tab & tempName & return & " Id:" & tab & tab & id of fld cField & return & " Style:" & tab & tab & style of fld cField & return & " Rect:" & tab & tab & rect of fld cField & return & " Loc:" & tab & tab & loc of fld cField & return & " ShowLines:" & tab & tab & showLines of fld cField & return & " WideMargins:" & tab & tab & widemargins of fld cField & return & " LockText:" & tab & tab & locktext of fld cField & return & " Visible:" & tab & tab & visible of fld cField & return & " TextAlign:" & tab & tab & textalign of fld cField & return & " TextFont:" & tab & tab & textfont of fld cField & return & " TextSize:" & tab & tab & textsize of fld cField & return & " TextStyle:" & tab & tab & textstyle of fld cField & return & " TextHeight:" & tab & tab & textheight of fld cField & return & return to file theFile end if if pBgFS = true then write " Script: " & return to file theFile if the script of bg fld cField is empty then write "" & return & return to file theFile else write the script of bg fld cField & return & return to file theFile end if else write return to file theFile end if if pBgFC = true then if the LockText of bg fld cField is true then write " Text:" & return & bg fld cField & return & return to file theFile end if end if end repeat -- Process Bg buttons if pBgBtn = true then put the number of bg btns into nBtns repeat with cBtn = 1 to nBtns write "Bg btn # " & cBtn & ":" & return to file theFile put short name of bg btn cBtn into tempName if tempName is empty then put "" into tempName write "Bg btn Name:" & tab & tab & tempName & return & " Id:" & tab & tab & id of bg btn cBtn & return & " Style:" & tab & tab & style of bg btn cBtn & return & " Rect :" & tab & tab & rect of bg btn cBtn & return & " Loc:" & tab & tab & loc of bg btn cBtn & return & " Icon:" & tab & tab & icon of bg btn cBtn & return & " ShowName:" & tab & tab & showName of bg btn cBtn & return & " AutoHilite:" & tab & tab & AutoHilite of bg btn cBtn & return & " Visible:" & tab & tab & visible of bg btn cBtn & return & " TextAlign:" & tab & tab & textalign of bg btn cBtn & return & " TextFont:" & tab & tab & textfont of bg btn cBtn & return & " TextSize:" & tab & tab & textsize of bg btn cBtn & return & return to file theFile if pBgBtnS = true then write " Script: " & return to file theFile if the script of bg btn cBtn is empty then write "" & return & return to file theFile else write the script of bg btn cBtn & return & return to file theFile end if end if end repeat end if end repeat --Process cards put number of cards into nCards repeat with cCard = 1 to nCards go to card cCard write return & "** Card # " & cCard & return to file theFile put short name of this card into cardName if cardName is empty then put "" into card name write "Cd name:" & tab & tab & cardName & return to file theFile write "Cd id:" & tab & tab & id of this card & return to file theFile write "Belongs to : Bg " & id of this bg & " [" & number of this bg & "]" & return to file theFile write "Cd " & cCard & " Script: " & return to file theFile if pCdS = true then if the script of this card is empty then write "" & return & return to file theFile else write the script of this card & return & return to file theFile end if else write return to file theFile end if -- Process card fields put the number of card fields into nFields repeat with cField = 1 to nFields if pCdF = true then write "Cd fld # " & cField & ":" & return to file theFile put short name of card field cField into tempName if tempName is empty then put "" into tempName write "Cd fld Name:" & tab & tab & tempName & return & " Id:" & tab & tab & id of card fld cField & return & " Style:" & tab & tab & style of card fld cField & return & " Rect:" & tab & tab & rect of card fld cField & return & " Loc:" & tab & tab & loc of card fld cField & return & " ShowLines:" & tab & tab & showLines of card fld cField & return & " WideMargins:" & tab & tab & widemargins of card fld cField & return & " LockText:" & tab & tab & locktext of card fld cField & return & " Visible:" & tab & tab & visible of card fld cField & return & " TextAlign:" & tab & tab & textalign of card fld cField & return & " TextFont:" & tab & tab & textfont of card fld cField & return & " TextSize:" & tab & tab & textsize of card fld cField & return & " TextStyle:" & tab & tab & textstyle of card fld cField & return & " TextHeight:" & tab & tab & textheight of card fld cField & return & return to file theFile if pCdFS = true then write " Script: " & return to file theFile if the script of card fld cField is empty then write "" & return & return to file theFile else write the script of card fld cField & return & return to file theFile end if end if if pCdFC = true then if LockText of card fld cField is true then write " Text:" & return & card fld cField & return & return to file theFile end if end if end if end repeat -- Process card buttons if pCdBtn = true then put the number of card btns into nBtns repeat with cBtn = 1 to nBtns write "Cd btn # " & cBtn & ":" & return to file theFile put short name of card btn cBtn into tempName if tempName is empty then put "" into tempName write "Cd btn Name:" & tab & tab & tempName & return & " Id:" & tab & tab & id of card btn cBtn & return & " Style:" & tab & tab & style of card btn cBtn & return & " Rect:" & tab & tab & rect of card btn cBtn & return & " Loc:" & tab & tab & loc of card btn cBtn & return & " Icon:" & tab & tab & icon of card btn cBtn & return & " ShowName:" & tab & tab & showName of card btn cBtn & return & " AutoHilite:" & tab & tab & AutoHilite of card btn cBtn & return & " Visible:" & tab & tab & visible of card btn cBtn & return & " TextAlign:" & tab & tab & textalign of card btn cBtn & return & " TextFont:" & tab & tab & textfont of card btn cBtn & return & " TextSize:" & tab & tab & textsize of card btn cBtn & return & return to file theFile if pCdBtnS = true then write " Script: " & return to file theFile if the script of card btn cBtn is empty then write "" & return & return to file theFile else write the script of card btn cBtn & return & return to file theFile end if end if end repeat end if end repeat close file theFile unlock screen pop card -- go stack MyId end mouseUp -- part 7 (button) -- low flags: 00 -- high flags: E006 -- rect: left=181 top=81 right=96 bottom=322 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Script -- part 9 (button) -- low flags: 00 -- high flags: E006 -- rect: left=47 top=153 right=168 bottom=188 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Script -- part 10 (button) -- low flags: 00 -- high flags: E006 -- rect: left=47 top=173 right=188 bottom=188 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Fields ----- HyperTalk script ----- on mouseUp get the hilite of me if it is false then set the hilite of cd button 5 to false set the hilite of cd button 6 to false end if end mouseUp -- part 11 (button) -- low flags: 00 -- high flags: E005 -- rect: left=63 top=193 right=208 bottom=204 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Script ----- HyperTalk script ----- on mouseUp get the hilite of me if it is true then set the hilite of cd btn 4 to true end mouseUp -- part 16 (button) -- low flags: 00 -- high flags: E005 -- rect: left=63 top=213 right=228 bottom=204 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Contents if locked ----- HyperTalk script ----- on mouseUp get the hilite of me if it is true then set the hilite of cd btn 4 to true end mouseUp -- part 17 (button) -- low flags: 00 -- high flags: E006 -- rect: left=47 top=233 right=248 bottom=188 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Buttons ----- HyperTalk script ----- on mouseUp if the hilite of me is false then set the hilite of cd btn 8 to false end mouseUp -- part 18 (button) -- low flags: 00 -- high flags: E005 -- rect: left=63 top=253 right=268 bottom=204 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Script ----- HyperTalk script ----- on mouseUp if the hilite of me is true then set the hilite of cd btn 7 to true end mouseUp -- part 20 (button) -- low flags: 00 -- high flags: E006 -- rect: left=305 top=153 right=168 bottom=446 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Script -- part 28 (button) -- low flags: 00 -- high flags: E006 -- rect: left=305 top=173 right=188 bottom=446 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Fields ----- HyperTalk script ----- on mouseUp get the hilite of me if it is false then set the hilite of cd button 11 to false set the hilite of cd button 12 to false end if end mouseUp -- part 29 (button) -- low flags: 00 -- high flags: E005 -- rect: left=321 top=193 right=208 bottom=462 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Script ----- HyperTalk script ----- on mouseUp get the hilite of me if it is true then set the hilite of cd btn 10 to true end mouseUp -- part 30 (button) -- low flags: 00 -- high flags: E005 -- rect: left=321 top=213 right=228 bottom=462 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Contents if locked ----- HyperTalk script ----- on mouseUp get the hilite of me if it is true then set the hilite of cd btn 10 to true end mouseUp -- part 32 (button) -- low flags: 00 -- high flags: E006 -- rect: left=305 top=233 right=248 bottom=446 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Buttons ----- HyperTalk script ----- on mouseUp if the hilite of me is false then set the hilite of cd btn 14 to false end mouseUp -- part 33 (button) -- low flags: 00 -- high flags: E005 -- rect: left=323 top=253 right=268 bottom=464 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Script ----- HyperTalk script ----- on mouseUp if the hilite of me is true then set the hilite of cd btn 13 to true end mouseUp -- part 34 (button) -- low flags: 00 -- high flags: A003 -- rect: left=276 top=313 right=335 bottom=375 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Select All ----- HyperTalk script ----- on mouseUp repeat with n = 2 to 14 set the hilite of cd button n to true end repeat end mouseUp -- part 35 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=237 top=305 right=339 bottom=274 -- title width / last selected line: 0 -- icon id / first selected line: 2507 / 2507 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp show card field 1 end mouseUp -- part 36 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=196 top=305 right=339 bottom=233 -- title width / last selected line: 0 -- icon id / first selected line: 1011 / 1011 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp go home end mouseUp -- part 37 (field) -- low flags: 81 -- high flags: 0007 -- rect: left=143 top=100 right=298 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 22 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseup hide me end mouseup -- part contents for card part 37 ----- text ----- To document a HyperCard stack simply select the options you wish to document. You may choose to include the stack script, background script, background field information, with or without script or contents. You may also choose to include button information, with or without its script. StakDoc works on locked and protected stacks. The options available for background item documentation are duplicated for each foreground card. You may select any or all of the individual items for documentation. When you have selected the options, click on the Document... button and select the stack you wish to document. After directing StakDoc to the stack and naming the resulting text file there will be a slight delay, longer for large stacks, while StakDoc does its job of ripping apart the stack. When the job is complete you will return to the start of this stack to document another stack if you so wish. The file produced by StakDoc is a standard text file. It may be opened in any word processor. To format the document correctly you will need to put a tab stop at about 5-6cm so that the columns line up correctly. The output of StakDoc is very comprehensive and should provide more than enough documentation about a stack to reconstruct it, for example; Bg fld # 1: Bg fld Name: Any Field Id: 3 Style: transparent Rect: 0,70,364,342 Loc: 182,206 ShowLines: false WideMargins:false LockText: false Visible: true TextAlign: left TextFont: Geneva TextSize: 9 TextStyle: plain TextHeight: 12 Script: This application is distributed under the honour system, it is not public domain. You may freely use it and distribute it provided that you agree not to sell it for profit or use it to induce anyone to buy something. Don't send me any money, bug reports, life stories or claims for compensation. I don't want them. If you like this product and use it then you might consider donating a few loose coins to the collection box of a worthy charity. Kids are usually a better investment than cats and dogs. Rick Mather Nautical Village, 57 Empire Bay Drive, Kincumber, NSW 2250 AUSTRALIA